package com.tin.bean;

import org.springframework.stereotype.Component;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.text.DateFormat;
import java.util.Date;

/**
 * @author liming_oicq@163.com
 * @date 2018-10-14 14:37
 * 登录的信息
 */
//@Component
@Entity
@Table(name = "token_info")
public class TokenInfo {

    @Id
    private Integer id;
    private String username;    //当前登录用户
    private String ip;          //当前登录IP
    private String token;       //token
    private String expireDate;  //token失效时间


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = expireDate;
    }

    @Override
    public String toString() {
        return "TokenInfo{" +
                "username='" + username + '\'' +
                ", ip='" + ip + '\'' +
                ", token='" + token + '\'' +
                ", expireDate='" + expireDate + '\'' +
                '}';
    }
}
